<template>
	<!-- QA问答 -->
	<view class="wrap">
		<view class="qus_title">
			<text>常见问题</text>
		</view>
		<view class="list">
			<scroll-view scroll-y style="height: calc(100vh);">
				<u-collapse hover-class="false">
					<u-collapse-item :title="item.head" v-for="(item, index) in itemList" :key="index">
						{{item.body}}
					</u-collapse-item>
				</u-collapse>
			</scroll-view>
			<view class="botbtn u-border-top">
				<view class="service-call" @click="callService">
					<icon-text iconPath="phone-fill" iconPosition="0" iconText="联系客服"  style="color:#fff"></icon-text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import iconText from '@/components/icon-text.vue'
	export default {
		components: {
			iconText
		},
		data() {
			return {
				itemList: [{
					head: "屏幕出现黑屏如何处理？",
					body: "1、检查电源线是否连接正常；2、检查屏幕是否有人为损坏；如以上情况均为出现，建议走报修流程。",
					open: true,
					disabled: true
				}, {
					head: "屏幕出现闪屏如何处理？",
					body: "学会欣赏，实际是一种积极生活的态度，是生活的调味品，会在欣赏中发现生活的美",
					open: false,
				}, {
					head: "屏幕开机无响应如何处理？",
					body: "但是据说雕刻大卫像所用的这块大理石，曾被多位雕刻家批评得一无是处，有些人认为这块大理石采凿得不好，有些人嫌它的纹路不够美",
					open: false,
				}, {
					head: "机顶盒突然无信号如何处理？",
					body: "但是据说雕刻大卫像所用的这块大理石，曾被多位雕刻家批评得一无是处，有些人认为这块大理石采凿得不好，有些人嫌它的纹路不够美",
					open: false,
				}, {
					head: "机顶盒重启失效如何处理？",
					body: "但是据说雕刻大卫像所用的这块大理石，曾被多位雕刻家批评得一无是处，有些人认为这块大理石采凿得不好，有些人嫌它的纹路不够美",
					open: false,
				}, {
					head: "屏幕出现闪屏如何处理？",
					body: "学会欣赏，实际是一种积极生活的态度，是生活的调味品，会在欣赏中发现生活的美",
					open: false,
				}],
			}
		},
		methods: {
			callService() {
				uni.makePhoneCall({
					phoneNumber: '110' //仅为示例
				});
			}
		}
	}
</script>

<style scoped lang="scss">
	.wrap {
		display: flex;
		flex-direction: column;
		align-items: center;
		overflow-x: scroll;
		
		.qus_title {
			width: 100%;
			position: relative;
			border-bottom: 2rpx solid #e9e9e9;
			padding: 30rpx;
			text {
				font-size: 32rpx;
				font-weight: bold;
				padding-left: 30rpx;
				line-height: 40rpx;
			}
			text::before {
				position: absolute;
				left: 30rpx;
				top: 30rpx;
				width: 6rpx;
				height: 36rpx;
				background-color: #009dff;
				border-radius: 3rpx;
				content: ' ';
				border-top-left-radius: 1px;
				border-top-right-radius: 1px;
				border-bottom-right-radius: 1px;
				border-bottom-left-radius: 1px;


			}
		}
		.botbtn {
			width: 100%;
			background: #ffffff;
			height: 160rpx;
			position: fixed;
			bottom: 0;
			.service-call {
				border-radius: 50rpx;
				background: #009dff;
				display: flex;
				height: 88rpx;
				width: 690rpx;
				margin: 30rpx;
				flex-direction: row;
				justify-content: center;
				align-items: center;
			}
		}
	}

	.list {
		::v-deep .u-collapse-item {
			border-bottom: 1px solid #e9e9e9;
			padding: 10rpx 30rpx;
		}

		::v-deep .u-collapse-content {
			padding-bottom: 20rpx;
		}
	}
</style>
